package ${parentPack}.dao;

import java.util.List;
import ${parentPack}.entity.${tableName};
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import ${parentPack}.dao.provider.${tableName}Provider;
import ${parentPack}.util.Page;

public interface ${tableName}Dao {
	
	@InsertProvider(type=${tableName}Provider.class,method="insert")
	Integer insert(${tableName} ${tableValue});
	
	@UpdateProvider(type=${tableName}Provider.class,method="update")
	Integer update(${tableName} ${tableValue});
	
	@DeleteProvider(type=${tableName}Provider.class,method="deleteById")
	int deleteById(Integer id);
	
	@SelectProvider(type=${tableName}Provider.class,method="getTotal")
	Integer getTotal(${tableName} ${tableValue});
	
	@SelectProvider(type=${tableName}Provider.class,method="findById")
	${tableName} findById(Integer id);
	
	@SelectProvider(type=${tableName}Provider.class,method="findAll")
	List<${tableName}> findAll();
	
	@SelectProvider(type=${tableName}Provider.class,method="findBy${tableName}")
	List<${tableName}> findBy${tableName}(${tableName} ${tableValue});
	
	@SelectProvider(type=${tableName}Provider.class,method="findByPage")
	List<${tableName}> findByPage(Page<?> page);
	
}
